package com.star.controller;


import com.star.domain.ShopType;
import com.star.mapper.ShopTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Star
 * @since 2021-04-21
 */
@Controller
@RequestMapping("/shopType")
public class ShopTypeController {
    @Autowired
    private ShopTypeMapper shopTypeMapper;

    /**
     * 查询全部店铺类型种类
     * @return JSON对象
     */
    @ResponseBody
    @RequestMapping("/kindAll")
    private List<ShopType> kindAll(){
        List<ShopType> shopTypeList = shopTypeMapper.selectList(null);
        return shopTypeList;
    }
}

